import http from "./http.js";
import config from "@/config/index.config.js";

// 图片配置接口
export const initConfig = (data,cd) => http.GET(`${config.baseUrl}/hotel/hotel/init`,data).then(cd);
// 微信授权登录
export const wxAutoLogin = (data,cd) => http.POST(`${config.authUrl}/login`,data).then(cd);
// 字节授权登录
export const ttAutoLogin = (data,cd) => http.POST(`${config.authUrl}/ttLogin`,data).then(cd);
// h5登录
export const h5Login = (data,cd) => http.POST(`${config.authUrl}/commonLogin`,data).then(cd);
// h5微信授权登录
export const officialLogin = (data,cd) => http.GET(`${config.authUrl}/officialLogin`,data).then(cd);

// 设置密码
export const setPassword = (data,cd) => http.POST(`${config.authUrl}/user/setPassword`,data).then(cd);
// 注册账号
export const commonReg = (data,cd) => http.POST(`${config.authUrl}/commonReg`,data).then(cd);
// 获取微信公众号配置
export const getJSSDK = (data,cd) => http.GET(`${config.authUrl}/getJSSDK`,data).then(cd);
// h5公众号登录
export const h5WxLogin = (data,cd) => http.GET(`${config.authUrl}/officialLogin`,data).then(cd);
// 订单支付
export const orderPay = (data,cd) => http.POST(`${config.baseUrl}/order/pay`,data).then(cd);
// 充值
export const rechargeMoney = (data,cd) => http.POST(`${config.authUrl}/user/rechargeMoney`,data).then(cd);


// 获取用户信息
export const getUserInfo = (data,cd) => http.GET(`${config.authUrl}/user/getUserInfo`,data).then(cd);
// 获取邀请人信息
export const getInviteInfo = (data,cd) => http.GET(`${config.authUrl}/user/getCodeUser`,data).then(cd);
// 获取富文本文章信息
export const getArticleDetail = (data,cd) => http.GET(`${config.baseUrl}/article/detail`,data).then(cd);
// 获取手机验证码
export const getMobileCode = (data,cd) => http.POST(`${config.authUrl}/sms/send`,data).then(cd);
